/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.fiap.exemplo;

import java.util.ArrayList;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean(name="backingBeanCadastro")
@SessionScoped
public class MeuCadastroBackingBean {

    ArrayList<MeuBean> lista = new ArrayList<MeuBean>();

    public ArrayList<MeuBean> getLista() {
        return lista;
    }
    public MeuCadastroBackingBean(){
        MeuBean p = new MeuBean();
        p.setNome("Evandro");
        lista.add(p);

        p = new MeuBean();
        p.setNome("Mariazinha");
        lista.add(p);
    }
    public String atualizar(MeuBean p){
        p.setNome( "" + Math.random()  );
        return null;
    }

}
